package com.zzw.baseadapterdemo2;

import android.app.ListActivity;
import android.os.Bundle;
import java.util.ArrayList;
import java.util.List;

public class KobeActivity extends ListActivity {
    private List<Kobe> data;
    public void init(){
        data = new ArrayList<Kobe>();
        Kobe k1 = new Kobe(1,"科比","命运的宠儿之创造传奇",R.drawable.k1);
        Kobe k2 = new Kobe(1,"黑曼巴","与横祸的幸运之遇见她",R.drawable.k2);
        Kobe k3 = new Kobe(1,"科比","永不服输的斗士之历练",R.drawable.k3);
        Kobe k4 = new Kobe(1,"黑曼巴","从平凡到不平凡的蜕变",R.drawable.k4);
        Kobe k5 = new Kobe(1,"科比","用行动改变命运的榜样",R.drawable.k5);

        data.add(k1);
        data.add(k2);
        data.add(k3);
        data.add(k4);
        data.add(k5);


    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        init();
        KobeAdapter kobeAdapter = new KobeAdapter(this,data);
        setListAdapter(kobeAdapter);

    }

}

